package com.siwei.mes.sync.erp.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.siwei.mes.common.validator.bus.SyncGroup;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;

/**
 * 根据物料名称获取所有厂家
 *
 * @Description: 根据物料名称获取所有厂家
 * @Version: 1.0
 * @author: mlchen
 * @date: 2024/8/19 20:32
 */
@Data
public class SyncProduct {
    @JSONField(name = "category")
    @JsonProperty(value = "category")
    @ApiModelProperty(value = "原材料类型  粗骨料，细骨料，水泥，矿粉，水，掺合料，外加剂，其他 ")
    //@NotBlank(groups = {SyncGroup.class}, message = "物料类型为空")
    private String category;

    @JSONField(name = "name")
    @JsonProperty(value = "name")
    @ApiModelProperty(value = "物料名称")
    @NotBlank(groups = {SyncGroup.class}, message = "物料名称为空")
    private String name;

    @JSONField(name = "spec")
    @JsonProperty(value = "spec")
    @ApiModelProperty(value = "物料规格")
    @NotBlank(groups = {SyncGroup.class}, message = "物料规格为空")
    private String spec;

    @JSONField(name = "supplierName")
    @JsonProperty(value = "supplierName")
    @ApiModelProperty(value = "供应商名称")
    private String supplierName;
}
